<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>embedme: Socket类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.8 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-attribs">Protected 属性</a> &#124;
<a href="class_socket-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">Socket类 参考<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Socket抽象基类  
 <a href="class_socket.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_socket_8h_source.html">Socket.h</a>&gt;</code></p>
<div class="dynheader">
类 Socket 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_socket.png" usemap="#Socket_map" alt=""/>
  <map id="Socket_map" name="Socket_map">
<area href="class_i_o_device.html" title="IO设备抽象类 " alt="IODevice" shape="rect" coords="41,0,113,24"/>
<area href="class_tcp_socket.html" title="TcpSocket类 " alt="TcpSocket" shape="rect" coords="0,112,72,136"/>
<area href="class_udp_socket.html" title="UdpSocket类 " alt="UdpSocket" shape="rect" coords="82,112,154,136"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:ad070af071d2e044ab71bad9a84360b57"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad070af071d2e044ab71bad9a84360b57"></a>
virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><b>open</b> ()=0</td></tr>
<tr class="separator:ad070af071d2e044ab71bad9a84360b57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae648df0cc1da2ad17f4bc65d396d2b71"><td class="memItemLeft" align="right" valign="top">virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_socket.html#ae648df0cc1da2ad17f4bc65d396d2b71">bind</a> (uint16 localPort, std::string localAddr=&quot;&quot;)</td></tr>
<tr class="memdesc:ae648df0cc1da2ad17f4bc65d396d2b71"><td class="mdescLeft">&#160;</td><td class="mdescRight">绑定socket到指定IP地址的端口上  <a href="#ae648df0cc1da2ad17f4bc65d396d2b71">更多...</a><br /></td></tr>
<tr class="separator:ae648df0cc1da2ad17f4bc65d396d2b71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abfbea049b117c0f4c91405b31b4694e4"><td class="memItemLeft" align="right" valign="top">virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_socket.html#abfbea049b117c0f4c91405b31b4694e4">connectToHost</a> (uint16 peerPort, std::string peerAddr)</td></tr>
<tr class="memdesc:abfbea049b117c0f4c91405b31b4694e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">检查socket是否已打开  <a href="#abfbea049b117c0f4c91405b31b4694e4">更多...</a><br /></td></tr>
<tr class="separator:abfbea049b117c0f4c91405b31b4694e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac11b26f96b7482cce8290d906a692b9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aac11b26f96b7482cce8290d906a692b9"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>getLocalAddr</b> ()</td></tr>
<tr class="separator:aac11b26f96b7482cce8290d906a692b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89b9de5a3e5e81bf5fdcb94989565a72"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a89b9de5a3e5e81bf5fdcb94989565a72"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>getPeerAddr</b> ()</td></tr>
<tr class="separator:a89b9de5a3e5e81bf5fdcb94989565a72"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e4c158afc1b2cefc43609c1c0622088"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8e4c158afc1b2cefc43609c1c0622088"></a>
sint32&#160;</td><td class="memItemRight" valign="bottom"><b>getLocalPort</b> ()</td></tr>
<tr class="separator:a8e4c158afc1b2cefc43609c1c0622088"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac75c2e8b397efe26f53b9ef541dee98f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac75c2e8b397efe26f53b9ef541dee98f"></a>
sint32&#160;</td><td class="memItemRight" valign="bottom"><b>getPeerPort</b> ()</td></tr>
<tr class="separator:ac75c2e8b397efe26f53b9ef541dee98f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9e3b0239157c8c1fb5a881b22f6e4cb"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_socket.html#aa9e3b0239157c8c1fb5a881b22f6e4cb">isAlive</a> ()</td></tr>
<tr class="memdesc:aa9e3b0239157c8c1fb5a881b22f6e4cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">检查socket是否已打开  <a href="#aa9e3b0239157c8c1fb5a881b22f6e4cb">更多...</a><br /></td></tr>
<tr class="separator:aa9e3b0239157c8c1fb5a881b22f6e4cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9a5eeed90596d23629a4d7777696575"><td class="memItemLeft" align="right" valign="top">virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_socket.html#af9a5eeed90596d23629a4d7777696575">open</a> (const char *device, sint32 ioMode)</td></tr>
<tr class="memdesc:af9a5eeed90596d23629a4d7777696575"><td class="mdescLeft">&#160;</td><td class="mdescRight">打开设备  <a href="#af9a5eeed90596d23629a4d7777696575">更多...</a><br /></td></tr>
<tr class="separator:af9a5eeed90596d23629a4d7777696575"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fe4c90416cad39e96049019d178fb37"><td class="memItemLeft" align="right" valign="top">virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_socket.html#a1fe4c90416cad39e96049019d178fb37">close</a> ()</td></tr>
<tr class="memdesc:a1fe4c90416cad39e96049019d178fb37"><td class="mdescLeft">&#160;</td><td class="mdescRight">关闭socket  <a href="#a1fe4c90416cad39e96049019d178fb37">更多...</a><br /></td></tr>
<tr class="separator:a1fe4c90416cad39e96049019d178fb37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67433b892f199e1745e3c7ca14e59593"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a67433b892f199e1745e3c7ca14e59593"></a>
virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><b>readData</b> (char *buf, sint32 count, sint32 timeoutMs=-1)=0</td></tr>
<tr class="separator:a67433b892f199e1745e3c7ca14e59593"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a896381b2d1eeeccf5a602ac7b40f67e1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a896381b2d1eeeccf5a602ac7b40f67e1"></a>
virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><b>writeData</b> (const char *buf, sint32 count, sint32 timeoutMs=-1)=0</td></tr>
<tr class="separator:a896381b2d1eeeccf5a602ac7b40f67e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae40a3069ac1e266adb1c4e9575190d49"><td class="memItemLeft" align="right" valign="top">virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_socket.html#ae40a3069ac1e266adb1c4e9575190d49">setAttribute</a> (sint32 attr, sint32 value)</td></tr>
<tr class="memdesc:ae40a3069ac1e266adb1c4e9575190d49"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置socket类型  <a href="#ae40a3069ac1e266adb1c4e9575190d49">更多...</a><br /></td></tr>
<tr class="separator:ae40a3069ac1e266adb1c4e9575190d49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe297c65236efc74fdadb399f7081fc9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afe297c65236efc74fdadb399f7081fc9"></a>
virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><b>getAttribute</b> (sint32 attr)</td></tr>
<tr class="separator:afe297c65236efc74fdadb399f7081fc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected 属性</h2></td></tr>
<tr class="memitem:a58716b99c436fc5003aaf29aec0dfac6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a58716b99c436fc5003aaf29aec0dfac6"></a>
sint32&#160;</td><td class="memItemRight" valign="bottom"><b>m_sockfd</b></td></tr>
<tr class="separator:a58716b99c436fc5003aaf29aec0dfac6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4a66dcf9fec7da8a9b1b83856fe66be"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae4a66dcf9fec7da8a9b1b83856fe66be"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>m_localAddr</b></td></tr>
<tr class="separator:ae4a66dcf9fec7da8a9b1b83856fe66be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75ed54fdf1f77872e030720424d4ee1a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a75ed54fdf1f77872e030720424d4ee1a"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>m_peerAddr</b></td></tr>
<tr class="separator:a75ed54fdf1f77872e030720424d4ee1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16e04162da1d3f68516998af9e061999"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a16e04162da1d3f68516998af9e061999"></a>
uint16&#160;</td><td class="memItemRight" valign="bottom"><b>m_localPort</b></td></tr>
<tr class="separator:a16e04162da1d3f68516998af9e061999"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba1561ea305405179f0b60a609248b97"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aba1561ea305405179f0b60a609248b97"></a>
uint16&#160;</td><td class="memItemRight" valign="bottom"><b>m_peerPort</b></td></tr>
<tr class="separator:aba1561ea305405179f0b60a609248b97"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a352e7e79cc7c18ab10fec2e4ccc51b1d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a352e7e79cc7c18ab10fec2e4ccc51b1d"></a>
struct sockaddr_in&#160;</td><td class="memItemRight" valign="bottom"><b>m_localSockAddr</b></td></tr>
<tr class="separator:a352e7e79cc7c18ab10fec2e4ccc51b1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_class_i_o_device"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_class_i_o_device')"><img src="closed.png" alt="-"/>&#160;Protected 属性 继承自 <a class="el" href="class_i_o_device.html">IODevice</a></td></tr>
<tr class="memitem:a5ab8e2aa83ad8a53d8ddbb19b23d3688 inherit pro_attribs_class_i_o_device"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5ab8e2aa83ad8a53d8ddbb19b23d3688"></a>
sint32&#160;</td><td class="memItemRight" valign="bottom"><b>m_fd</b></td></tr>
<tr class="separator:a5ab8e2aa83ad8a53d8ddbb19b23d3688 inherit pro_attribs_class_i_o_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4900690afb4b4d17f90cfe3a9fb504e inherit pro_attribs_class_i_o_device"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa4900690afb4b4d17f90cfe3a9fb504e"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>m_devName</b></td></tr>
<tr class="separator:aa4900690afb4b4d17f90cfe3a9fb504e inherit pro_attribs_class_i_o_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e930bf51c6a266e5be5b2ed62c7ecfa inherit pro_attribs_class_i_o_device"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5e930bf51c6a266e5be5b2ed62c7ecfa"></a>
sint32&#160;</td><td class="memItemRight" valign="bottom"><b>m_openMode</b></td></tr>
<tr class="separator:a5e930bf51c6a266e5be5b2ed62c7ecfa inherit pro_attribs_class_i_o_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>Socket抽象基类 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="ae648df0cc1da2ad17f4bc65d396d2b71"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sint32 Socket::bind </td>
          <td>(</td>
          <td class="paramtype">uint16&#160;</td>
          <td class="paramname"><em>localPort</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>localAddr</em> = <code>&quot;&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>绑定socket到指定IP地址的端口上 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">localPort</td><td>要绑定的端口 </td></tr>
    <tr><td class="paramname">localAddr</td><td>绑定的IP地址,不指定则为默认本机任意地址 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回STATUS_OK,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a1fe4c90416cad39e96049019d178fb37"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sint32 Socket::close </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>关闭socket </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">void</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回STATUS_OK,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

<p>重载 <a class="el" href="class_i_o_device.html#a1120c9e7a7c4d0b23083effbe4cb6279">IODevice</a> .</p>

<p>被 <a class="el" href="class_tcp_socket.html#a58d2fff73fb69eb3f18b00aca7d6c87a">TcpSocket</a> , 以及 <a class="el" href="class_udp_socket.html#a579acf9700828b5e1c030b37475ec7ea">UdpSocket</a> 重载.</p>

</div>
</div>
<a class="anchor" id="abfbea049b117c0f4c91405b31b4694e4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sint32 Socket::connectToHost </td>
          <td>(</td>
          <td class="paramtype">uint16&#160;</td>
          <td class="paramname"><em>peerPort</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>peerAddr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>检查socket是否已打开 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">void</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>打开返回true,关闭返回false </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

<p>被 <a class="el" href="class_tcp_socket.html#a5470902009a68d3fd66c924eb33a6737">TcpSocket</a> 重载.</p>

</div>
</div>
<a class="anchor" id="aa9e3b0239157c8c1fb5a881b22f6e4cb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Socket::isAlive </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>检查socket是否已打开 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">void</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>打开返回true,关闭返回false </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="af9a5eeed90596d23629a4d7777696575"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual sint32 Socket::open </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>devName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sint32&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>打开设备 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">devName</td><td>设备全名(包含路径,如:/dev/ttyS0) </td></tr>
    <tr><td class="paramname">mode</td><td>打开模式IO_MODE_E </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>设备打开成功返回STATUS_OK,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

<p>重载 <a class="el" href="class_i_o_device.html#a426aac91300f077d57b1f30c76c7c430">IODevice</a> .</p>

</div>
</div>
<a class="anchor" id="ae40a3069ac1e266adb1c4e9575190d49"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sint32 Socket::setAttribute </td>
          <td>(</td>
          <td class="paramtype">sint32&#160;</td>
          <td class="paramname"><em>attr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sint32&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置socket类型 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">socketType</td><td>SOCKET_TYPE_E </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回STATUS_OK,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

<p>实现了 <a class="el" href="class_i_o_device.html">IODevice</a>.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>libemb/inc/<a class="el" href="_socket_8h_source.html">Socket.h</a></li>
<li>libemb/src/Socket.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2016年 七月 7日 星期四 19:49:39 , 为 embedme使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
